package com.ktgj.flight.common.huaxia;

import com.ktgj.flight.common.pay._Yeepay;
import com.ktgj.flight.domain.InterfaceEntity.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class G5ServiceImpl implements G5Service {
    @Autowired
    private _G5 g5;
    @Autowired
    private _Yeepay yeepay;

    //航班查询
    @Override
    public MoFlightSearchResponse flightSearch(MoFlightSearchRequest request) {
        MoFlightSearchResponse response = g5._FlightSearch(request);
        return response;
    }

    //航班预定
    @Override
    public MoCreateOrderResponse orderCreate(MoCreateOrderRequest request) {
        MoCreateOrderResponse response = g5._OrderCreate(request);
        return response;
    }

    //查询订单详情
    @Override
    public MoQueryOrderResponse queryOrderInfo(MoQueryOrderRequest request) {
        MoQueryOrderResponse response = g5._QueryOrderInfo(request);
        return response;
    }

    //订单支付
    @Override
    public MoOrderPayResponse orderPayment(MoYeePayRequest request) {
        MoOrderPayResponse response = yeepay._OrderPayment(request);
        return response;
    }

    //出票
    @Override
    public MoOrderPayResponse orderPay(MoOrderPayRequest request) {
        MoOrderPayResponse response = g5._OrderPay(request);
        return response;
    }

    //查询退票手续费
    @Override
    public MoOrderRefundCaltResponse orderRefundCalt(MoOrderRefundCaltRequest request) {
        MoOrderRefundCaltResponse response = g5._OrderRefundCalt(request, false);
        return response;
    }

    //申请退票
    @Override
    public MoOrderRefundResponse orderRefund(MoOrderRefundRequest request) {
        MoOrderRefundResponse response = g5._OrderRefund(request);
        return response;
    }
}
